SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.DnnProduct_AddFolderPermission
	@FolderID 		int,
	@PermissionID 	int,
	@RoleID 		int,
	@AllowAccess 	bit,
    @UserID 		int,
	@CreatedByUserID  	int
AS

INSERT INTO dbo.DnnProduct_FolderPermission (
	[FolderID],
	[PermissionID],
	[RoleID],
	[AllowAccess],
	[UserID],
	[CreatedByUserID],
	[CreatedOnDate],
	[LastModifiedByUserID],
	[LastModifiedOnDate]
) VALUES (
	@FolderID,
	@PermissionID,
	@RoleID,
	@AllowAccess,
	@UserID,
	@CreatedByUserID,
	getdate(),
	@CreatedByUserID,
	getdate()
)

select SCOPE_IDENTITY()

GO
